<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="paymentsPantList.title"/></title>

    <meta name="heading" content="<fmt:message key='paymentsPantList.heading'/>"/>
    <meta name="menu" content="RoleAdminPurchase"/>
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpPaymentsPantList.html?decorate=false'/>"
           title="<fmt:message key="help.pPL"/>"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>

<c:set var="buttons">
    <c:if test="${canAdd}">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/editPaymentsPant.html"/>'"
        value="<fmt:message key="button.add"/>"/>
    </c:if>
    <input type="button" onclick="location.href='<c:url value="/backToEmployeesPant.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<s:set name="balances" value="balances" scope="request"/>
<display:table name="balances" class="table" requestURI="" id="balanceList" export="true" pagesize="25">
    <display:column titleKey="edit">
        <c:if test="${balanceList.amountPaid > 0}">
            <a href="<c:url value="/editPaymentsPant.html?id=${balanceList.paymentsPant.id}"/>"><img src="<c:url value="/images/edit.png" />" alt="Edit" /></a>
        </c:if>
    </display:column>
    <display:column property="dateBalance" titleKey="balance.dateBalance"/>
    <display:column property="amountWon" titleKey="balance.amountWon"/>
    <display:column property="amountPaid" titleKey="balance.amountPaid"/>
    <display:column property="balance" titleKey="balance.balance"/>

    <display:setProperty name="paging.banner.item_name" value="balances"/>
    <display:setProperty name="paging.banner.items_name" value="balances"/>

    <display:setProperty name="export.excel.filename" value="BalanceList.xls"/>
    <display:setProperty name="export.csv.filename" value="BalanceList.csv"/>
    <display:setProperty name="export.pdf.filename" value="BalanceList.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("paymentsPantList");
</script>